<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script>
			var ar=["apple","canada","Australia","Banana"];
			var count=0;
			for(i in ar)
			{
				if(ar[i].indexOf("a")!=-1)
				{
					count++;
				}
			}
			document.write("有"+count+"个含有a");
		</script>
	</head>
	<body>
	</body>
</html>
